/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entidade;

import Conexao.Persistir;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 *
 * @author francis.almeida
 */

@Entity
public class Configuracoes implements Serializable{
    
    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    private Long id;

    @Column(name="smtp")
    private String smtp;
    
    @Column(name="remetente")
    private String remetente;
    
    @Column(name="usuario_email")
    private String usuario_email;
    
    @Column(name="senha_email")
    private String senha_email;
    
    @Column(name="porta")
    private String porta;
    
    @Column(name="email_ssl")
    private boolean email_ssl;
    
    @Column(name="email_tls")
    private boolean email_tls;
    
    @Column(name="email_notificacao")
    private String email_notificacao;

    public String getEmail_notificacao() {
        return email_notificacao;
    }

    public void setEmail_notificacao(String email_notificacao) {
        this.email_notificacao = email_notificacao;
    }
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSmtp() {
        return smtp;
    }

    public void setSmtp(String smtp) {
        this.smtp = smtp;
    }

    public String getRemetente() {
        return remetente;
    }

    public void setRemetente(String remetente) {
        this.remetente = remetente;
    }

    public String getUsuario_email() {
        return usuario_email;
    }

    public void setUsuario_email(String usuario_email) {
        this.usuario_email = usuario_email;
    }

    public String getSenha_email() {
        return senha_email;
    }

    public void setSenha_email(String senha_email) {
        this.senha_email = senha_email;
    }

    public String getPorta() {
        return porta;
    }

    public void setPorta(String porta) {
        this.porta = porta;
    }

    public boolean isEmail_ssl() {
        return email_ssl;
    }

    public void setEmail_ssl(boolean email_ssl) {
        this.email_ssl = email_ssl;
    }

    public boolean isEmail_tls() {
        return email_tls;
    }

    public void setEmail_tls(boolean email_tls) {
        this.email_tls = email_tls;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Configuracoes other = (Configuracoes) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 13 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }
    
    
    public void Salvar(Object objeto) throws Exception {

        new Persistir().Salvar(objeto);

    }

    public void Atulizar(Object objeto) throws Exception {

        new Persistir().Atualizar(objeto);

    }

    public void Deletar(Object objeto) throws Exception {

        new Persistir().Deletar(objeto);

    }
    
    
}
